package com.wcl.nullmusic.utils;

/**
 * Created by dllo on 16/1/17.
 */
public class NumberUtils {
    private static NumberUtils utils;

    private NumberUtils() {
    }

    public static NumberUtils getInstance() {
        if (utils == null) {
            utils = new NumberUtils();
        }
        return utils;
    }

    // 单位转换 例 100000=10W;
    public static String toUnit(int num) {
        if (num < 10000)
            return num + "";
        else
            return (num / 10000) + "." + ((num % 10000) / 1000) + "万";
    }
}
